package com.qingcheng.controller.goods;

import com.alibaba.dubbo.config.annotation.Reference;
import com.qingcheng.pojo.goods.StockBack;
import com.qingcheng.service.goods.StockBackService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author yangjun
 * 2019/7/23
 * 18:46
 */
@Component
public class SkuTask {
    @Reference
    private StockBackService stockBackService;

    /**
     * 间隔一个小时
     */
    @Scheduled(cron = "0 0 0/1 * * ?")
    public void skuStockBack() {
        stockBackService.doBack();
    }
}
